<template>
	<view class='my-config'>
		
		<view class="myMsg">
			<view class="myImg">
				个人头像：<image :src="userInfo.imgUrl" mode=""></image>
			</view>
			<view class="mySex">
				<span>性别：</span>
				<input type="text" value="" v-model="userInfo.sex"/>
			</view>
			<view class="mySex">
				<span>电话号码：</span>
				<input type="text" value="" v-model="userInfo.phone"/>
			</view>
		</view>
		<view class='my-exit' @tap="loginOut">退出登录</view>

	</view>
</template>

<script setup>
	import {
		userStore
	} from '@/store/user.js'
	import {
		storeToRefs
	} from 'pinia'
	const userListStore = userStore()
	const {
		loginStatus,
		token,
		userInfo,
	} = storeToRefs(userListStore)
	const loginOut=()=>{
		uni.showToast({
			title:'退出成功',
			icon:'none'
		})
		userListStore.loginOut()
		uni.reLaunch({
			url:'../index/index'
		})
	}
</script>

<style scoped>
.mySex{
	display: flex;

}
.myMsg{
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items:space-between;
	height: 300rpx;
	padding: 20rpx ;
	
}
.myImg{
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
}
.myImg image{
	width: 100rpx;
	height: 100rpx;
}

.my-exit{
	background-color: #49BDFB;
	width:100%;
	line-height: 80rpx;
	color:#FFFFFF;
	text-align: center;
}
</style>
